Command Line Tool
There is a completely new command line tool which you can use to administer domains and accounts as well as all system variables. This tool is called tool.exe and you can find it directly in the <InstallDirectory> folder. For Linux, this is called tool.sh. It is easy to use and you only have to know the API constants. Complete list of API constants is in the APIconst.pas file in the <InstallDirectory>\API\Delphi\ folder.
Note: Using tool.exe for performing large operation can cause temporary service unavailability because the service needs to be restarted for some changes in configuration. For servers with many domains and many users with high load, restarting can take some time. Therefore, we recommend performing large batches of changes in low-load periods.
Note: Command line tool does not support multi-line - you can encounter this e.g. using the autoresponder variable.
Parameter |
Description |
---|---|
ACCOUNT [variables] |
Address any account on the server. |
DOMAIN [variables] |
Address any domain on the server. |
SYSTEM [variables] |
Address any system variable such as c_version, c_name, etc. List is also in APIConst.pas |
BATCH batchfile |
Allows you to run a batch file with a set of commands included. See examples below. Batchfile is just a common text file with commands. Each on a separate line. These commands must not include "tool" at the beginning. Just the commands and parameters. |
USERSTATISTICS fromdate todate filterstring outputfile |
Saves user statistics between fromdate and todate to specified output file for all users that fulfill the condition of filterstring. fromdate, todate have yyyy/mm/dd format filterstring supports also asterisks and question marks to specify more accounts. If it does not contain @ symbol it is considered as domain name. outputfile - if you do not specify absolute path, it will be saved to the <InstallDirectory> folder. |
How to create other types of accounts
To do this, you have to use the u_type property. Its values are also written in the APIConst.pas file. For example mailing list has 1 as a value of this property. So if I want to create mailing list, I will have to use this:
Usage
- It creates an account with New Account in Full Name field and pass as password.
- It shows you values of both variables of u_mailbox and u_accounttype of the new@icewarpdemo.com account.
- It deletes the oldone.net domain from your server.
- It changes all accounts in icewarpdemo.com to IMAP accounts.
- It saves user statistics between dates 2004/12/25 and 2004/12/31 for all accounts in icewarpdemo.com domain to the statistics.txt file. This file can be found in the <install_dir> folder.
- It shows on the screen the d_description and d_postmaster variables for all domains in CSV format - each value is separated by comma.
- Besides exporting the three above fields, it also puts user's full email address into the first column.
-
Imports three fields from CSV.
Note: The first field imported from this CSV file is an email address - it is imported automatically and is not to be written in the import command. It has to be specified in CSV in the first place.
- It shows the system variable that contains a POP3 service port.
- where create_mailing.txt looks like:
- It creates three mailing lists defined in the create_mailing.txt file.
- It verifies which accounts do not comply with the new password policy.
- It redirects to a file.
Example:
- Gets a listing of accounts with double line feeds.
-
listing with single line feeds.
Note: Passwords can contain special chars. All quotes are prefixed with backslashes. If there is a comma in a password, this password is quoted.